<!DOCTYPE>
<html>
{include file="head.html"}

<body>
<div class="fullscreen">
  <div class="scroll_content">
  <div class="topfixed">
    	<div class="t_left"><a href="/index.php?m=user"><i class="back"></i></a></div>
      <div class="t_main">在线支付</div>
       
    </div>
    <div class="paddingheight"></div> 
 

<script type="text/javascript">

		//调用微信JS api 支付
		function jsApiCall()
		{
			WeixinJSBridge.invoke(
				'getBrandWCPayRequest',
				{$jsApiParameters},
				function(res){
					//WeixinJSBridge.log(res.err_msg);
					if(res.err_msg=='get_brand_wcpay_request:ok'){
						skyToast('支付成功');
						setTimeout(function(){
							window.location="{$url}";
						},1000)
					}else{
						skyToast('支付失败'+res.err_msg);
					}
					 
					
				}
			);
		}

		function callpay()
		{
			
			if (typeof WeixinJSBridge == "undefined"){
				 
			    if( document.addEventListener ){
			        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
			    }else if (document.attachEvent){
			        document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
			        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
			    }
			}else{
			    jsApiCall();
			}
		}
		callpay();
	</script>
     <div style=" line-height:40px; width:210px; text-align:center;">
     	你需要支付{$order.money}元。
     </div>
     <button class="cart_change_btn" type="button" onClick="callpay()" >确定支付</button>
 
  </div  
></div>
</body>
</html>
